package hichecker.ui.components.grading_key_vis;

import hichecker.university.GradingKey;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.Arrays;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class GradingKeyPanel extends JPanel {
	public GradingKeyPanel() {
		setLayout(new BorderLayout());
	}
	
	public static void main(String[] args) {
		Float[] points = new Float[] { 0f, 0f, 1f, 1.5f, 1.5f, 4f, 6f, 6f, 6.5f, 6.5f, 6.5f, 11f };
		GradingKey gradingKey = new GradingKey();

		JFrame frame = new JFrame();
		frame.getContentPane().setLayout(new BorderLayout());
		
		frame.getContentPane().add(new GradingKeyDiagram(gradingKey, Arrays.asList(points), 11f),
				BorderLayout.CENTER);

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setPreferredSize(new Dimension(400, 230));
		frame.pack();
		frame.setVisible(true);
	}
}
